Skip to main content

Clear

Clears the content from the current row.

Syntax

expression.Clear();

expression - A variable that represents a ApiTableRow class.

Parameters

This method doesn't have any parameters.

Returns

boolean

Example

This example clears the content from the row.

let doc = Api.GetDocument();
let tableStyle = doc.CreateStyle("CustomTableStyle", "table");
tableStyle.SetBasedOn(doc.GetStyle("Bordered"));
let table = Api.CreateTable(3, 3);
table.SetStyle(tableStyle);
let row = table.GetRow(0);
row.GetCell(0).GetContent().GetElement(0).AddText("First row");
row.Clear();
row = table.GetRow(1);
row.GetCell(0).GetContent().GetElement(0).AddText("The first row content was cleared.");
doc.Push(table);